package com.liang.dao.user;

import com.liang.pojo.Role;
import com.liang.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface UserDao {
    public User getLoginUser(Connection connection,String userCode);
    public Boolean updatePassword(Connection connection,String userPassword,Integer id);
    public List<User> getUserList(Connection connection,String userName,int userRole,int currentPageNo,int pageSize) throws SQLException;
    public int getCount(Connection connection,String userName,int userRole);
    public Boolean deleteUser(Connection connection,Integer uid);
    public User getUserInfoForId(Connection connection,Integer uid);

    public Boolean insertUser(Connection connection, String userCode, String userName, String userPassword,
                              Integer gender, Date birthday,String phone,String address,Integer userRole,Integer createdBy,
                              Date creationDate);
    public Boolean modifyUser(Connection connection,Integer id, String userName,Integer gender, Date birthday,String phone,String address,Integer userRole,Integer modifyBy,
                              Date modifyDate);
}
